package com.gotop.common.node;

import com.alibaba.fastjson.JSONObject;

import java.util.ArrayList;
import java.util.List;

/**
 * @program: cem
 * @description:
 * @author: superfish
 * @create: 2020-12-22 15:08
 **/
public class NodeTest {
    public NodeTest() {
    }

    public static void main(String[] args) {
        List<ForestNode> list = new ArrayList();
        list.add(new ForestNode(11111111111L, 01111111111L, "1"));
        list.add(new ForestNode(21111111111L, 01111111111L, "2"));
        list.add(new ForestNode(31111111111L, 11111111111L, "3"));
        list.add(new ForestNode(41111111111L, 21111111111L, "4"));
        list.add(new ForestNode(51111111111L, 31111111111L, "5"));
        list.add(new ForestNode(61111111111L, 41111111111L, "6"));
        list.add(new ForestNode(71111111111L, 31111111111L, "7"));
        list.add(new ForestNode(81111111111L, 51111111111L, "8"));
        list.add(new ForestNode(91111111111L, 61111111111L, "9"));
        list.add(new ForestNode(111111111110L, 91111111111L, "10"));
        List<ForestNode> tns = ForestNodeMerger.merge(list);
        tns.forEach((node) -> {
            System.out.println(JSONObject.toJSONString(node));
        });
    }
}
